package com.migration.model.olddb;

import jakarta.persistence.*;
import lombok.Data;
import java.time.LocalDateTime;
import java.io.Serializable;

/**
 * 用户表 实体类
 * 表名：sys_user
 * 自动生成的实体类
 */
@Data
@Entity
@Table(name = "sys_user")
public class SysUser implements Serializable {

    private static final long serialVersionUID = 1L;
    
    /**
     * 主键id
     * 主键
     */
    @Id
    @Column(name = "id", nullable = false, length = 32)
    private String id;
    
    /**
     * 登录账号
     */
    @Column(name = "username", length = 100)
    private String username;
    
    /**
     * 真实姓名
     */
    @Column(name = "realname", length = 100)
    private String realname;
    
    /**
     * 密码
     */
    @Column(name = "password", length = 255)
    private String password;
    
    /**
     * md5密码盐
     */
    @Column(name = "salt", length = 45)
    private String salt;
    
    /**
     * 头像
     */
    @Column(name = "avatar", length = 255)
    private String avatar;
    
    /**
     * 生日
     */
    @Column(name = "birthday")
    private java.time.LocalDateTime birthday;
    
    /**
     * 性别(0-默认未知,1-男,2-女)
     */
    @Column(name = "sex")
    private Boolean sex;
    
    /**
     * 电子邮件
     */
    @Column(name = "email", length = 45)
    private String email;
    
    /**
     * 电话
     */
    @Column(name = "phone", length = 45)
    private String phone;
    
    /**
     * 机构编码
     */
    @Column(name = "org_code", length = 64)
    private String orgCode;
    
    /**
     * 性别(1-正常,2-冻结)
     */
    @Column(name = "status")
    private Boolean status;
    
    /**
     * 删除状态(0-正常,1-已删除)
     */
    @Column(name = "del_flag")
    private Boolean delFlag;
    
    /**
     * 第三方登录的唯一标识
     */
    @Column(name = "third_id", length = 100)
    private String thirdId;
    
    /**
     * 第三方类型
     */
    @Column(name = "third_type", length = 100)
    private String thirdType;
    
    /**
     * 同步工作流引擎(1-同步,0-不同步)
     */
    @Column(name = "activiti_sync")
    private Boolean activitiSync;
    
    /**
     * 工号，唯一键
     */
    @Column(name = "work_no", length = 100)
    private String workNo;
    
    /**
     * 职务，关联职务表
     */
    @Column(name = "post", length = 100)
    private String post;
    
    /**
     * 座机号
     */
    @Column(name = "telephone", length = 45)
    private String telephone;
    
    /**
     * 创建人
     */
    @Column(name = "create_by", length = 32)
    private String createBy;
    
    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private java.time.LocalDateTime createTime;
    
    /**
     * 更新人
     */
    @Column(name = "update_by", length = 32)
    private String updateBy;
    
    /**
     * 更新时间
     */
    @Column(name = "update_time")
    private java.time.LocalDateTime updateTime;
    
    /**
     * 身份（1普通成员 2上级）
     */
    @Column(name = "user_identity")
    private Boolean userIdentity;
    
    /**
     * 负责部门
     */
    @Column(name = "depart_ids", length = 2147483647)
    private String departIds;
    
    /**
     * 多租户标识
     */
    @Column(name = "rel_tenant_ids", length = 100)
    private String relTenantIds;
    
    /**
     * 设备ID
     */
    @Column(name = "client_id", length = 64)
    private String clientId;
    
    /**
     * 租户主键ID
     * 默认值: 1
     */
    @Column(name = "tenant_id")
    private Integer tenantId;
    
    @Override
    public String toString() {
        return "SysUser{" +
            "id=" + id +
            ", username=" + username +
            ", realname=" + realname +
            ", password=" + password +
            ", salt=" + salt +
            ", avatar=" + avatar +
            ", birthday=" + birthday +
            ", sex=" + sex +
            ", email=" + email +
            ", phone=" + phone +
            ", orgCode=" + orgCode +
            ", status=" + status +
            ", delFlag=" + delFlag +
            ", thirdId=" + thirdId +
            ", thirdType=" + thirdType +
            ", activitiSync=" + activitiSync +
            ", workNo=" + workNo +
            ", post=" + post +
            ", telephone=" + telephone +
            ", createBy=" + createBy +
            ", createTime=" + createTime +
            ", updateBy=" + updateBy +
            ", updateTime=" + updateTime +
            ", userIdentity=" + userIdentity +
            ", departIds=" + departIds +
            ", relTenantIds=" + relTenantIds +
            ", clientId=" + clientId +
            ", tenantId=" + tenantId +
        '}';
    }
} 